package com.ship.control.search;

/**
 * 人员
 * @author wqf
 * @version  Nov 24, 2011 11:55:45 AM
 */
public class DeptSearchCond extends SearchCond{
	
	private String deptName;
	
	public String getDeptName() {
		return deptName;
	}


	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}


	/**
	 * 管理员组
	 */
	private Boolean isAdminPart;
	
	
	public ConditionPart getCondition(){
		ConditionPart cp=new ConditionPart();
		StringBuffer searchStr=new StringBuffer(" 1=1");
		
		if(null!=isAdminPart){
			searchStr.append(" and dept.isAdminPart=?");
			cp.getParams().add(isAdminPart);
		}
		if(null!=deptName){
			searchStr.append(" and deptName like ?");
			cp.getParams().add("%"+deptName+"%");
		}
		cp.setExpression(searchStr.toString());
		return cp;
	}


	public Boolean getIsAdminPart() {
		return isAdminPart;
	}


	public void setIsAdminPart(Boolean isAdminPart) {
		this.isAdminPart = isAdminPart;
	}
	
}
